//
//  XJGoodsOverFooter.m
//  XinJiangMall
//
//  Created by Tzyang on 2018/4/10.
//  Copyright © 2018年 Tzyang. All rights reserved.
//

#import "XJGoodsOverFooter.h"

@interface XJGoodsOverFooter ()

@property (strong , nonatomic)UILabel * overLabel;
@property (nonatomic ,strong) UIView * overLine;


@end

@implementation XJGoodsOverFooter

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        //self.backgroundColor = XJCOLOR_RGB(221, 221, 221);
        [self setUpUI];
    }
    return self;
}

- (UIView *)overLine{
    if (!_overLine) {
        UIView * overLine = [UIView new];
        self.overLine = overLine;
        [self addSubview:overLine];
    }
    return _overLine;
}

- (UILabel *)overLabel{
    if (!_overLabel) {
        UILabel * overLabel = [UILabel new];
        self.overLabel = overLabel;
        [self addSubview:overLabel];
    }
    return _overLabel;
}

- (void)setUpUI{
    
    self.overLine.backgroundColor = XJCOLOR_RGB(221, 221, 221);
    self.overLine.frame = CGRectMake(10, 0.5, KWidth-20, 0.5);
    
    self.overLabel = [[UILabel alloc] init];
    self.overLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:_overLabel];
    self.overLabel.font = XJFONTSET_R(16);
    self.overLabel.textColor = [UIColor darkGrayColor];
    self.overLabel.text = @"没有更多了";
}

#pragma mark - 布局
- (void)layoutSubviews
{
    [super layoutSubviews];
    
    [self.overLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.mas_equalTo(self);
    }];
}

@end
